Skip to content

[v6r20] Space token usage#3611

Merged
atsareg merged 1 commit into
DIRACGrid:integrationfrom
chaen:rel-v6r20_REBASE_spaceTokenUsage
Feb 19, 2018
Merged

[v6r20] Space token usage#3611
atsareg merged 1 commit into
DIRACGrid:integrationfrom
chaen:rel-v6r20_REBASE_spaceTokenUsage

Conversation

@chaen

@chaen chaen commented Feb 6, 2018

Copy link
Copy Markdown
Contributor

Replaces #3601
Sorry @fstagni I lost your commits when doing the rebase, they are all squashed in a diff now.

It contains a real implementation of the getOccupancy for the StorageElement, as well as an implementation for GFAL2_SRM2.
Note that the version of gfal2 we use at the moment has bugs (see comments) that will be fixed in 2.15. For the time being, I wrote workarounds.

BEGINRELEASENOTES

*Core
NEW: utility to convert file sizes between different unit

*Resources
NEW: Added StorageElement.getOccupancy() method for DIP and GFAL2_SMR2 SE types

*RSS
CHANGE: Using StorageElement.getOccupancy()
ENDRELEASENOTES

@chaen chaen requested review from atsareg and fstagni as code owners February 6, 2018 13:26
@coveralls

coveralls commented Feb 6, 2018

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.03%) to 20.328% when pulling 2bb2024 on chaen:rel-v6r20_REBASE_spaceTokenUsage into b18d731 on DIRACGrid:integration.

@chaen chaen force-pushed the rel-v6r20_REBASE_spaceTokenUsage branch from acd2493 to 3effa58 Compare February 6, 2018 13:42
Comment thread Resources/Storage/GFAL2_SRM2Storage.py Outdated
spaceTokenAttr = 'spacetoken.description?%s' % self.protocolParameters['SpaceToken']
# gfal2 can take any srm url as a base.
spaceTokenEndpoint = self.getURLBase()['Value']
print "%s %s" % (spaceTokenEndpoint, spaceTokenAttr)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you left a print here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, corrected


TODO: needs gfal2.15 because of bugs:
https://its.cern.ch/jira/browse/DMC-979
https://its.cern.ch/jira/browse/DMC-977

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't you already "going around" these 2 bugs in the lines below?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, why ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, just to confirm.


except (gfal2.GError, ValueError) as e:
errStr = 'Something went wrong while checking for spacetoken occupancy.'
self.log.verbose(errStr, e.message)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verbose? or error?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say verbose, because the error is returned to the StorageElement which will try another plugin

@chaen chaen force-pushed the rel-v6r20_REBASE_spaceTokenUsage branch from 3effa58 to df639af Compare February 7, 2018 07:08
fstagni
fstagni previously approved these changes Feb 7, 2018
@chaen chaen changed the title [v6r20] Space token usage [WIP][v6r20] Space token usage Feb 7, 2018
@chaen

chaen commented Feb 7, 2018

Copy link
Copy Markdown
Contributor Author

Wait do not merge ! Something came up from IT, I have to correct a few things

@fstagni

fstagni commented Feb 14, 2018

Copy link
Copy Markdown
Contributor

news from IT?

@chaen

chaen commented Feb 14, 2018

Copy link
Copy Markdown
Contributor Author

Yes, I still have to implement it. I try asap.

@chaen chaen force-pushed the rel-v6r20_REBASE_spaceTokenUsage branch from df639af to 2bb2024 Compare February 14, 2018 15:48
@chaen

chaen commented Feb 14, 2018

Copy link
Copy Markdown
Contributor Author

Corrected

@chaen chaen changed the title [WIP][v6r20] Space token usage [v6r20] Space token usage Feb 14, 2018
@fstagni

fstagni commented Feb 14, 2018

Copy link
Copy Markdown
Contributor

You updated a single commit... what have been the latest changes?

@chaen

chaen commented Feb 14, 2018

Copy link
Copy Markdown
Contributor Author

Just added the WSUrl in the call to get the space token in order not to go to the BDII

@atsareg atsareg merged commit 0031e53 into DIRACGrid:integration Feb 19, 2018
@chaen chaen deleted the rel-v6r20_REBASE_spaceTokenUsage branch August 14, 2019 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants